import maya.cmds as cmds


def createCustomWorkspaceControlUI():
    scrollLayout = cmds.scrollLayout(horizontalScrollBarThickness=16,verticalScrollBarThickness=16)
    for i in range(2):
      cmds.button()
  
  
new_control_name = ["MOD","ANI","RIG"]
if cmds.workspaceControl(new_control_name[0],q=1, exists=True):
    cmds.deleteUI(new_control_name[0])
cmds.workspaceControl(new_control_name[0], label=new_control_name[0],dockToControl=('ToolBox', 'right'),tabPosition=("west",1),tabToControl=(new_control_name[0], -1),retain=False,
        initialWidth=50,
        initialHeight=50,
        minimumWidth=50,
        minimumHeight=50)

for i in range(len(new_control_name)):
    num = i+1
    if not num == len(new_control_name):
        if cmds.workspaceControl(new_control_name[i+1],q=1, exists=True):
            cmds.deleteUI(new_control_name[i+1])
        cmds.workspaceControl(new_control_name[i+1], label=new_control_name[i+1],tabPosition=("west",1),tabToControl=(new_control_name[0], -1),retain=False,
        initialWidth=50,
        initialHeight=50,
        minimumWidth=50,
        minimumHeight=50)(workspace_control_name,label=u"mod",dockToControl=('ToolBox', 'right'),tabPosition=("west",1),tabToControl=(new_control_name, 0),retain=False,initialWidth=50,initialHeight=300,minimumWidth=50,minimumHeight=100)#

def createCustomWorkspaceControlUI():
    scrollLayout = cmds.scrollLayout(horizontalScrollBarThickness=16,verticalScrollBarThickness=16)
    for i in range(2):
      cmds.button()
createCustomWorkspaceControlUI()